package com.sc.VenusQueryBeta.adapter.account.xiaofei;

import com.chad.library.adapter.base.BaseViewHolder;
import com.hengjun.kingstar.sdk.utils.StringUtils;
import com.sc.VenusQueryBeta.R;
import com.sc.VenusQueryBeta.adapter.BaseCompatAdapter;
import com.sc.VenusQueryBeta.model.bean.account.xiaofei.XiaoFei02Bean;

import java.util.List;

/**
 * 賬戶信息適配器
 */

public class Xiaofei02Adapter extends BaseCompatAdapter<XiaoFei02Bean.SunList,BaseViewHolder> {


    public Xiaofei02Adapter(int item_zhuanma02, List<XiaoFei02Bean.SunList> list) {
        super(item_zhuanma02, list);
    }

    public Xiaofei02Adapter(int item_zhuanma02) {
        super(item_zhuanma02);
    }

    @Override
    protected void convert(BaseViewHolder helper, XiaoFei02Bean.SunList item) {
        helper.setText(R.id.tv_id,item.getClientid());//戶口
        helper.setText(R.id.tv_date, item.getRoomdate());//日期
        helper.setText(R.id.tv_money, item.getTotalprice()+mContext.getString(R.string.yuan));//金额
        if (item.getConsumetype().equals("1")) {
            helper.setText(R.id.tv_trade_type,"直升機");//类型
        }
        if (item.getConsumetype().equals("2")) {
            helper.setText(R.id.tv_trade_type,"船飛");//类型
        }
        if (item.getConsumetype().equals("3")) {
            helper.setText(R.id.tv_trade_type,"酒店");//类型
        }
        if (item.getConsumetype().equals("4")) {
            helper.setText(R.id.tv_trade_type,"食飛");//类型
        }
        if (item.getConsumetype().equals("5")) {
            helper.setText(R.id.tv_trade_type,"雜項");//类型
        }
        if (item.getConsumetype().equals("6")) {
            helper.setText(R.id.tv_trade_type,"跨境車");//类型
        }
        if (item.getConsumetype().equals("7")) {
            helper.setText(R.id.tv_trade_type,"機票");//类型
        }
        if (item.getConsumetype().equals("8")) {
            helper.setText(R.id.tv_trade_type,"即出");//类型
        }
        if (item.getConsumetype().equals("9")) {
            helper.setText(R.id.tv_trade_type,"車輛");//类型
        }
    }

}

